package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CirculationSheetMapper;
import com.ruoyi.system.domain.CirculationSheet;
import com.ruoyi.system.service.ICirculationSheetService;
import com.ruoyi.common.core.text.Convert;

/**
 * 流转单Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-03-12
 */
@Service
public class CirculationSheetServiceImpl implements ICirculationSheetService 
{
    @Autowired
    private CirculationSheetMapper circulationSheetMapper;

    /**
     * 查询流转单
     * 
     * @param id 流转单ID
     * @return 流转单
     */
    @Override
    public CirculationSheet selectCirculationSheetById(Long id)
    {
        return circulationSheetMapper.selectCirculationSheetById(id);
    }

    /**
     * 查询流转单列表
     * 
     * @param circulationSheet 流转单
     * @return 流转单
     */
    @Override
    public List<CirculationSheet> selectCirculationSheetList(CirculationSheet circulationSheet)
    {
        return circulationSheetMapper.selectCirculationSheetList(circulationSheet);
    }

    /**
     * 新增流转单
     * 
     * @param circulationSheet 流转单
     * @return 结果
     */
    @Override
    public int insertCirculationSheet(CirculationSheet circulationSheet)
    {
        return circulationSheetMapper.insertCirculationSheet(circulationSheet);
    }

    /**
     * 修改流转单
     * 
     * @param circulationSheet 流转单
     * @return 结果
     */
    @Override
    public int updateCirculationSheet(CirculationSheet circulationSheet)
    {
        return circulationSheetMapper.updateCirculationSheet(circulationSheet);
    }

    /**
     * 删除流转单对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteCirculationSheetByIds(String ids)
    {
        return circulationSheetMapper.deleteCirculationSheetByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除流转单信息
     * 
     * @param id 流转单ID
     * @return 结果
     */
    @Override
    public int deleteCirculationSheetById(Long id)
    {
        return circulationSheetMapper.deleteCirculationSheetById(id);
    }
}
